/**
 * Copyright (C) 2022-2023
 * All rights reserved, Designed By www.tonetn.com
 */
package com.xunyin.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

/**
 * @Author xunyinyunshang  <3594419785@qq.com>
 * 支付相关枚举
 */
@Getter
@AllArgsConstructor
public enum PayMethodEnum {

    WECHAT("wechat", "公众号支付"),
    WXAPP("wxapp", "小程序支付"),
    APP("app", "app支付");


    private String value;
    private String desc;

    public static PayMethodEnum toType(String value) {
        return Stream.of(PayMethodEnum.values())
                .filter(p -> p.value.equals(value))
                .findAny()
                .orElse(null);
    }


}
